{template '_header'}

<div class="page-heading"> <h2>商城设置</h2> </div>
 
    <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data" >
        <div class="form-group">
            <label class="col-sm-2 control-label must">商户名称</label>
            <div class="col-sm-8">
                {ifp 'sysset.shop.edit'}
                <input type="text" class="form-control" name="merchname" value="{$item['merchname']}" data-rule-required="true"/>
                {else}
                <div class="form-control-static">{$item['merchname']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">商户logo</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.shop.edit'}
                {php echo tpl_form_field_image('logo',$item['logo'],'../addons/ewei_shopv2/static/images/nopic.jpg',array('dest_dir'=>'merch/'.$_W['merchid']))}
                <span class="help-block">商户logo 建议尺寸 300 * 300</span>
                {else}
                {if empty($item['logo'])}
                <img src="../addons/ewei_shopv2/static/images/nopic.jpg" onerror="this.src='../addons/ewei_shopv2/static/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" width="150">
                {else}
                <img src="{php echo tomedia($item['logo'])}" onerror="this.src='../addons/ewei_shopv2/static/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" width="150">
                {/if}
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label must">主营项目</label>
            <div class="col-sm-8">
                {ifp 'sysset.shop.edit'}
                <input type="text" class="form-control" name="salecate" value="{$item['salecate']}" data-rule-required="true"/>
                {else}
                <div class="form-control-static">{$item['merchname']}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label must">联系人</label>
            <div class="col-sm-8">
                {ifp 'sysset.shop.edit'}
                <input type="text" class="form-control" name="realname" value="{$item['realname']}" data-rule-required="true"/>
                {else}
                <div class="form-control-static">{$item['realname']}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label must">联系电话</label>
            <div class="col-sm-8">
                {ifp 'sysset.shop.edit'}
                <input type="tel" class="form-control" name="mobile" value="{$item['mobile']}" data-rule-required="true"/>
                {else}
                <div class="form-control-static">{$item['mobile']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">商户简介</label>
            <div class="col-sm-8">
                {ifp 'sysset.shop.edit'}
                <textarea name="desc1" class="form-control">{$item['desc']}</textarea>
                {else}
                <div class="form-control-static">{$item['desc']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">商户地址</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.shop.edit'}
                <input type="text" name="address" class="form-control" value="{$item['address']}" />
                {else}
                <div class='form-control-static'>{$item['address']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">商户电话</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.shop.edit'}
                <input type="text" name="tel" class="form-control" value="{$item['tel']}" />
                {else}
                <div class='form-control-static'>{$item['tel']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">商户位置</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.shop.edit'}
                {php echo tpl_form_field_coordinate('map',array('lng'=>$item['lng'],'lat'=>$item['lat']))}
                {else}
                <div class='form-control-static'>lng={$item['lng']},lat={$item['lat']}</div>
                {/if}
            </div>
        </div>

        {if $diyform_flag}
        <div class="form-group-title">追加资料</div>
        {template 'diyform/diyform_input'}
        {else}
        {/if}
            <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                           {ifp 'sysset.shop.edit'}
                            <input type="submit" value="提交" class="btn btn-primary"  />
                          {/if}
                     </div>
            </div>
	 
 
    </form>
 
{template '_footer'}     